<?php
echo '<br />';
echo '<h3>Search product Common For modify</h3>';
echo '<br />';
echo $error;

echo '<form action = "'.base_url().'addmincont/searchEdit" method="post" name="searchedit">';
	echo "<table><tr>";
		echo "<td>";
			echo "Product Name : ";
		echo "</td>";
		echo "<td>";
			echo '<input type = "text" name = "namep" id = "namep" value="" size="30"/>';
		echo "</td></tr>";
		
		echo "<tr><td>";
			echo "Product Color : ";
		echo "</td>";
		echo "<td>";
			echo '<input type = "text" name = "colorp" id = "colorp" value="" size="30"/>';
		echo "</td></tr>";
		
		echo "<tr><td>";
			echo "Product Type : ";
		echo "</td>";
		echo "<td>";
			echo '<select name = "typep" id = "typep" />';
			echo '<option value="">Categories Type</option>';
			$couttype = count($catetype);
			for($i=0;$i<$couttype;$i++){
				$type = $catetype[$i]['cat_type_name'];
				echo '<optgroup label="'.$type.'">';
				$order = array(' ','/','_','&','%','@',';','"',"'",'{','}');
	  			$type = str_replace($order, "", $type); 
				$couttypesub = count($catetype[$i][0]);
				for($j=0;$j<$couttypesub;$j++){
					echo '<option value="'.$catetype[$i][0][$j]['cat_type_sub_id'].'">'.$catetype[$i][0][$j]['cat_type_sub_name'].'</option>';
				}
			}
		echo "</td></tr>";
		
		echo "<tr><td colspan='2'>";
			
			echo '<input type="submit" value="Search" />';
		echo "</td>";
echo '</tr></table></form>';